{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Query Meta data in database Groups [v1.1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# imports\n",
    "from astropy import units as u\n",
    "from astropy.coordinates import SkyCoord\n",
    "\n",
    "import specdb\n",
    "from specdb.specdb import SpecDB\n",
    "from specdb import specdb as spdb_spdb\n",
    "from specdb.cat_utils import flags_to_groups"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Setup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Database is igmspec\n",
      "Created on 2017-Jan-07\n"
     ]
    }
   ],
   "source": [
    "db_file = specdb.__path__[0]+'/tests/files/IGMspec_DB_v02_debug.hdf5'\n",
    "reload(spdb_spdb)\n",
    "sdb = spdb_spdb.SpecDB(db_file=db_file)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Check one of the meta tables"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "&lt;Table length=4&gt;\n",
       "<table id=\"table4624446416\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSSJ</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAG</th><th>JMAGERR</th><th>HMAG</th><th>HMAGERR</th><th>KMAG</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>DGMI</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>PLATE</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>EPOCH</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>TELESCOPE</th><th>INSTR</th><th>DATE-OBS</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>R</th><th>GROUP_ID</th><th>DISPERSER</th></tr></thead>\n",
       "<thead><tr><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>str3</th><th>float64</th><th>str3</th><th>int64</th><th>str27</th><th>str12</th><th>str6</th><th>str10</th><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>int64</th><th>str4</th></tr></thead>\n",
       "<tr><td>001115.23+144601.8</td><td>2.8135</td><td>14.7672</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>17.547</td><td>0.342</td><td>16.76</td><td>0.257</td><td>15.796</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>-0.922</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>751</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td><td>4.970</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>Gemini-North</td><td>GMOS-N</td><td>2011-05-25</td><td>1583</td><td>4911.0</td><td>7831.1</td><td>940.0</td><td>0</td><td>B600</td></tr>\n",
       "<tr><td>010619.24+004823.3</td><td>16.5802</td><td>0.8065</td><td>4.4488</td><td>24.045</td><td>0.832</td><td>21.113</td><td>0.043</td><td>19.029</td><td>0.024</td><td>18.607</td><td>0.03</td><td>18.313</td><td>0.028</td><td>0.133</td><td>20.521</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>17.526</td><td>0.327</td><td>16.531</td><td>0.252</td><td>16.038</td><td>0.267</td><td>0.0</td><td>26</td><td>-28.572</td><td>-0.256</td><td>0</td><td>1</td><td>1</td><td>0</td><td>8404993</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td><td>2738</td><td>52234</td><td>51816</td><td>396</td><td>454</td><td>40</td><td>5</td><td>29</td><td>243</td><td>8404997</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td><td>24.0</td><td>0.807</td><td>21.164</td><td>0.037</td><td>19.055</td><td>0.01</td><td>18.701</td><td>0.013</td><td>18.44</td><td>0.034</td><td>587731513678561523</td><td>111686640707043328</td><td>SDSS J010619.24+004823.3</td><td>2.896888</td><td>2.057134</td><td>0.404843</td><td>0.278306</td><td>2.800888</td><td>2.082134</td><td>0.336843</td><td>0.245306</td><td>SDSSJ0106+0048</td><td>0.0258001939864</td><td>4.4502</td><td>5</td><td>-2</td><td>580</td><td>800</td><td>4.449</td><td>0.005</td><td>0</td><td>6.88373</td><td>0.524438</td><td>0</td><td>4.449</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>17656</td><td>SDSSJ0106+0048_B600.fits.gz</td><td>Gemini-South</td><td>GMOS-S</td><td>2011-04-29</td><td>1581</td><td>4336.3</td><td>7243.6</td><td>940.0</td><td>2</td><td>B600</td></tr>\n",
       "<tr><td>021043.16-001818.4</td><td>32.6799</td><td>-0.3051</td><td>4.7331</td><td>24.699</td><td>0.964</td><td>22.666</td><td>0.107</td><td>20.505</td><td>0.033</td><td>19.174</td><td>0.027</td><td>19.174</td><td>0.047</td><td>0.147</td><td>20.405</td><td>14.314</td><td>49.137</td><td>0.373</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>-28.142</td><td>-0.433</td><td>0</td><td>1</td><td>1</td><td>0</td><td>33554433</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>3325</td><td>52522</td><td>51816</td><td>405</td><td>263</td><td>41</td><td>3</td><td>326</td><td>333</td><td>33554433</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>23.914</td><td>1.036</td><td>22.885</td><td>0.16</td><td>20.745</td><td>0.041</td><td>19.278</td><td>0.015</td><td>19.313</td><td>0.06</td><td>588015508746797389</td><td>114219914696327168</td><td>SDSS J0210-0018</td><td>1.994192</td><td>2.131306</td><td>1.312037</td><td>-0.017346</td><td>0.990192</td><td>2.110306</td><td>1.448037</td><td>-0.052346</td><td>SDSSJ0210-0018</td><td>0.0285160038797</td><td>4.7079</td><td>5</td><td>-2</td><td>610</td><td>830</td><td>4.77</td><td>0.02</td><td>0</td><td>2.8</td><td>0.28</td><td>0</td><td>4.770</td><td>0.02</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>32720</td><td>SDSSJ0210-0018_B600.fits.gz</td><td>Gemini-South</td><td>GMOS-S</td><td>2011-04-29</td><td>1587</td><td>4627.1</td><td>7552.9</td><td>940.0</td><td>4</td><td>B600</td></tr>\n",
       "<tr><td>023137.65-072854.4</td><td>37.9069</td><td>-7.4818</td><td>5.4135</td><td>24.367</td><td>1.206</td><td>25.33</td><td>0.629</td><td>21.565</td><td>0.079</td><td>19.554</td><td>0.027</td><td>19.212</td><td>0.066</td><td>0.169</td><td>20.519</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>-28.052</td><td>0.744</td><td>0</td><td>1</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1729</td><td>51813</td><td>51908</td><td>454</td><td>610</td><td>40</td><td>6</td><td>333</td><td>251</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>24.545</td><td>1.199</td><td>25.356</td><td>0.629</td><td>21.545</td><td>0.078</td><td>19.527</td><td>0.025</td><td>19.193</td><td>0.066</td><td>587727180613353723</td><td>128012585147564032</td><td>SDSS J0231-0728</td><td>-1.007616</td><td>3.730862</td><td>1.989199</td><td>0.322058</td><td>-0.855616</td><td>3.776862</td><td>1.996199</td><td>0.314058</td><td>SDSSJ0231-0728</td><td>0.0327837051406</td><td>5.4145</td><td>7</td><td>-2</td><td>660</td><td>860</td><td>5.42</td><td>0.005</td><td>0</td><td>1.4</td><td>0.21</td><td>0</td><td>5.420</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>36731</td><td>SDSSJ0231-0728_B600.fits.gz</td><td>Gemini-South</td><td>GMOS-S</td><td>2011-04-29</td><td>1581</td><td>5134.6</td><td>8060.4</td><td>940.0</td><td>5</td><td>B600</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table length=4>\n",
       "      SDSSJ        RA_GROUP DEC_GROUP  z_s10  ...    R    GROUP_ID DISPERSER\n",
       "      str31        float64   float64  float64 ... float64  int64      str4  \n",
       "------------------ -------- --------- ------- ... ------- -------- ---------\n",
       "001115.23+144601.8   2.8135   14.7672  4.9672 ...   940.0        0      B600\n",
       "010619.24+004823.3  16.5802    0.8065  4.4488 ...   940.0        2      B600\n",
       "021043.16-001818.4  32.6799   -0.3051  4.7331 ...   940.0        4      B600\n",
       "023137.65-072854.4  37.9069   -7.4818  5.4135 ...   940.0        5      B600"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ggg_meta = sdb['GGG'].meta\n",
    "ggg_meta[0:4]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Query meta with Query dict"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### A simple example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "qdict = {'TELESCOPE': 'Gemini-North', 'NPIX': (1580,1583), 'DISPERSER': ['B600', 'R400']}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "&lt;Table length=2&gt;\n",
       "<table id=\"table4624252752\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSSJ</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAG</th><th>JMAGERR</th><th>HMAG</th><th>HMAGERR</th><th>KMAG</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>DGMI</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>PLATE</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>EPOCH</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>TELESCOPE</th><th>INSTR</th><th>DATE-OBS</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>R</th><th>GROUP_ID</th><th>DISPERSER</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>str3</th><th>float64</th><th>str3</th><th>int64</th><th>str27</th><th>str12</th><th>str6</th><th>str10</th><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>int64</th><th>str4</th><th>str3</th></tr></thead>\n",
       "<tr><td>001115.23+144601.8</td><td>2.8135</td><td>14.7672</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>17.547</td><td>0.342</td><td>16.76</td><td>0.257</td><td>15.796</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>-0.922</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>751</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td><td>4.970</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>Gemini-North</td><td>GMOS-N</td><td>2011-05-25</td><td>1583</td><td>4911.0</td><td>7831.1</td><td>940.0</td><td>0</td><td>B600</td><td>GGG</td></tr>\n",
       "<tr><td>073103.12+445949.4</td><td>112.7630</td><td>44.9971</td><td>5.004</td><td>25.465</td><td>0.74</td><td>25.454</td><td>0.472</td><td>20.877</td><td>0.035</td><td>19.226</td><td>0.02</td><td>19.198</td><td>0.055</td><td>0.406</td><td>20.867</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>-28.312</td><td>1.351</td><td>0</td><td>1</td><td>1</td><td>1</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>4264</td><td>52963</td><td>53314</td><td>1866</td><td>168</td><td>40</td><td>4</td><td>57</td><td>592</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>25.467</td><td>0.741</td><td>25.458</td><td>0.473</td><td>20.874</td><td>0.035</td><td>19.214</td><td>0.02</td><td>19.187</td><td>0.055</td><td>587738067263619664</td><td>525461289133146112</td><td>SDSS J073103.12+445949.4</td><td>-0.096184</td><td>4.494988</td><td>1.598626</td><td>-0.019908</td><td>-0.098184</td><td>4.501988</td><td>1.607626</td><td>-0.020908</td><td>SDSSJ0731+4459</td><td>0.0787584869059</td><td>5.0086</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.998</td><td>0.005</td><td>0</td><td>3.22344</td><td>0.118597</td><td>0</td><td>4.998</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>41217</td><td>SDSSJ0731+4459_B600.fits.gz</td><td>Gemini-North</td><td>GMOS-N</td><td>2011-05-25</td><td>1582</td><td>4914.1</td><td>7831.9</td><td>940.0</td><td>8</td><td>B600</td><td>GGG</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table length=2>\n",
       "      SDSSJ        RA_GROUP DEC_GROUP  z_s10  ... GROUP_ID DISPERSER GROUP\n",
       "      str31        float64   float64  float64 ...  int64      str4    str3\n",
       "------------------ -------- --------- ------- ... -------- --------- -----\n",
       "001115.23+144601.8   2.8135   14.7672  4.9672 ...        0      B600   GGG\n",
       "073103.12+445949.4 112.7630   44.9971   5.004 ...        8      B600   GGG"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qmeta = sdb.query_meta(qdict)\n",
    "qmeta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Another example"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "&lt;Table length=5&gt;\n",
       "<table id=\"table4624445776\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>Name</th><th>QSO</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>zem_GROUP</th><th>Z_LLS</th><th>logNHI</th><th>sig(logNHI) [2]</th><th>SPEC_FILE</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>EPOCH</th><th>NPIX</th><th>DATE-OBS</th><th>WV_MIN</th><th>WV_MAX</th><th>R</th><th>GROUP_ID</th><th>DISPERSER</th><th>INSTR</th><th>TELESCOPE</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str33</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str37</th><th>float64</th><th>str4</th><th>str3</th><th>int64</th><th>float64</th><th>int64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>int64</th><th>str4</th><th>str5</th><th>str13</th><th>str10</th></tr></thead>\n",
       "<tr><td>HD-LLS_J010619.24+004823.3_z4.172</td><td>SDSS0106+0048</td><td>16.5802</td><td>0.8065</td><td>4.433</td><td>4.17157</td><td>19.05</td><td>0.2 .. 0.2</td><td>HD-LLS_J010619.24+004823.3_MIKE.fits</td><td>0.0</td><td>UNKN</td><td>QSO</td><td>17656</td><td>2000.0</td><td>70180</td><td>2003-08-26</td><td>3456.4</td><td>8108.2</td><td>25000.0</td><td>5</td><td>BOTH</td><td>MIKE</td><td>Magellan</td><td>HD-LLS_DR1</td></tr>\n",
       "<tr><td>HD-LLS_J012156.03+144823.8_z2.662</td><td>SDSS0121+1448</td><td>20.4835</td><td>14.8066</td><td>2.870</td><td>2.66231</td><td>19.25</td><td>0.2 .. 0.15</td><td>HD-LLS_J012156.03+144823.8_HIRES.fits</td><td>0.0</td><td>UNKN</td><td>QSO</td><td>21499</td><td>2000.0</td><td>147082</td><td>2004-09-08</td><td>3243.9</td><td>6138.4</td><td>48000.0</td><td>6</td><td>BOTH</td><td>HIRES</td><td>Keck-I</td><td>HD-LLS_DR1</td></tr>\n",
       "<tr><td>HD-LLS_J012403.80+004432.7_z3.078</td><td>SDSS0124+0044</td><td>21.0158</td><td>0.7424</td><td>3.834</td><td>3.0776</td><td>20.2</td><td>0.2 .. 0.2</td><td>HD-LLS_J012403.80+004432.7_MIKE.fits</td><td>0.0</td><td>UNKN</td><td>QSO</td><td>22001</td><td>2000.0</td><td>74362</td><td>2003-08-28</td><td>3314.9</td><td>8108.7</td><td>25000.0</td><td>7</td><td>BOTH</td><td>MIKE</td><td>Magellan</td><td>HD-LLS_DR1</td></tr>\n",
       "<tr><td>HD-LLS_J012700.70-004559.0_z2.944</td><td>SDSS0127-00</td><td>21.7529</td><td>-0.7664</td><td>4.066</td><td>2.94398</td><td>19.8</td><td>0.2 .. 0.2</td><td>HD-LLS_J012700.70-004559.0_ESI.fits</td><td>0.0</td><td>UNKN</td><td>QSO</td><td>22730</td><td>2000.0</td><td>28124</td><td>2002-11-30</td><td>3995.9</td><td>10203.0</td><td>6000.0</td><td>8</td><td>ECH</td><td>ESI</td><td>Keck-II</td><td>HD-LLS_DR1</td></tr>\n",
       "<tr><td>HD-LLS_J013340.40+040059.0_z3.995</td><td>PSS0133+0400</td><td>23.4183</td><td>4.0164</td><td>4.149</td><td>3.99501</td><td>20.1</td><td>0.3 .. 0.2</td><td>HD-LLS_J013340.40+040059.0_ESI.fits</td><td>0.0</td><td>UNKN</td><td>QSO</td><td>24295</td><td>2000.0</td><td>28117</td><td>2002-12-01</td><td>3994.9</td><td>10198.1</td><td>6000.0</td><td>9</td><td>ECH</td><td>ESI</td><td>Keck-II</td><td>HD-LLS_DR1</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table length=5>\n",
       "               Name                    QSO      ... TELESCOPE   GROUP   \n",
       "              str33                   str19     ...   str13     str10   \n",
       "--------------------------------- ------------- ... --------- ----------\n",
       "HD-LLS_J010619.24+004823.3_z4.172 SDSS0106+0048 ...  Magellan HD-LLS_DR1\n",
       "HD-LLS_J012156.03+144823.8_z2.662 SDSS0121+1448 ...    Keck-I HD-LLS_DR1\n",
       "HD-LLS_J012403.80+004432.7_z3.078 SDSS0124+0044 ...  Magellan HD-LLS_DR1\n",
       "HD-LLS_J012700.70-004559.0_z2.944   SDSS0127-00 ...   Keck-II HD-LLS_DR1\n",
       "HD-LLS_J013340.40+040059.0_z3.995  PSS0133+0400 ...   Keck-II HD-LLS_DR1"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qdict = {'R': (4000.,1e9), 'WV_MIN': (0., 4000.)}\n",
    "qmeta = sdb.query_meta(qdict)\n",
    "qmeta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### One more"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "masked_BaseColumn(data = ['BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'SDSS_DR7'\n",
       " 'SDSS_DR7' 'SDSS_DR7' 'SDSS_DR7' 'SDSS_DR7'],\n",
       "                  mask = [False False False False False False False False False False],\n",
       "            fill_value = N/A)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qdict = {'R': (1800.,2500), 'WV_MIN': (0., 4000.)}\n",
    "qmeta = sdb.query_meta(qdict)\n",
    "qmeta['GROUP'].data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "----"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Query meta at position\n",
    "    As with query catalog, the position coordinates can have a range of formats"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### One simple source"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 match[es] within radius=1 arcsec\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table length=1&gt;\n",
       "<table id=\"table4625056784\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str9</th><th>str3</th><th>int64</th><th>str28</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str4</th><th>str4</th><th>str10</th><th>str9</th></tr></thead>\n",
       "<tr><td>000000.45+174625.4</td><td>0.0019</td><td>17.7737</td><td>268514930</td><td>6173</td><td>56238</td><td>528</td><td>2.30909729004</td><td>2.30909729004</td><td>0.000943339022342</td><td>0</td><td>2.30763868197</td><td>-1.0</td><td>0.346182279084</td><td>2.31230791362</td><td>2.30638494927</td><td>2.3046866469</td><td>0</td><td>2199023796224</td><td>0</td><td>0</td><td>0</td><td>0</td><td>-1 .. -1</td><td>-1 .. -1</td><td>-1 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>0.537336213179</td><td>0.779484925454</td><td>-1.0 .. -1.0</td><td>0.58568293642</td><td>0.915501904005</td><td>-1.0</td><td>4278.7900341</td><td>1595.2886496</td><td>2683.5013845</td><td>2.15328741853</td><td>44.0028643812</td><td>1.40097166147</td><td>3575.00108901</td><td>1554.12165803</td><td>2020.87943097</td><td>0.706666936497</td><td>38.4285671721</td><td>15.8517240349</td><td>7996.40388327</td><td>4579.19012749</td><td>3417.21375578</td><td>0.223279535625</td><td>69.3860000703</td><td>17.8808108042</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>7713</td><td>54741</td><td>301</td><td>4</td><td>231</td><td>1237678601842131080</td><td>1.03847694397 .. 2.65843176842</td><td>12.3596630096 .. 0.852828204632</td><td>22.4397926331 .. 21.3626842499</td><td>0.28713452816 .. 0.386405169964</td><td>1.03847694397 .. 2.65843176842</td><td>-23.882931269</td><td>-0.0820910409093</td><td>0.146194890141 .. 0.0419441759586</td><td>0.113614 .. 0.0338511</td><td>21.9297126138</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.302318871021</td><td>8.78557314038</td><td>0.727564871311</td><td>4.53735896492</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-1</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-11-07</td><td>2100.0</td><td>2.308</td><td>-1.0</td><td>BOSS_PCA</td><td>QSO</td><td>0</td><td>spec-6173-56238-0528.fits.gz</td><td>4556</td><td>3605.0</td><td>10289.6</td><td>0</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table length=1>\n",
       "    SDSS_NAME      RA_GROUP DEC_GROUP ... DISPERSER TELESCOPE    GROUP  \n",
       "      str18        float64   float64  ...    str4     str10       str9  \n",
       "------------------ -------- --------- ... --------- ---------- ---------\n",
       "000000.45+174625.4   0.0019   17.7737 ...      BOTH SDSS 2.5-M BOSS_DR12"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta = sdb.meta_from_position((0.0019,17.7737), 1*u.arcsec)\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Multiple meta entries (GGG)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 match[es] within radius=1 arcsec\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([ 4911.02528934,  6496.10029461])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta = sdb.meta_from_position('001115.23+144601.8', 1*u.arcsec)\n",
    "meta['WV_MIN'].data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Multiple sources"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 12 match[es] within radius=20 deg\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=3&gt;\n",
       "<table id=\"table4630690832\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th><th>Name</th><th>QSO</th><th>Z_LLS</th><th>logNHI</th><th>sig(logNHI) [2]</th><th>SDSSJ</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAGERR</th><th>HMAGERR</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>str3</th><th>int64</th><th>str37</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str6</th><th>str4</th><th>str13</th><th>str10</th><th>str33</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th></tr></thead>\n",
       "<tr><td>000000.45+174625.4</td><td>0.0019</td><td>17.7737</td><td>268514930</td><td>6173</td><td>56238</td><td>528</td><td>2.30909729004</td><td>2.30909729004</td><td>0.000943339022342</td><td>0</td><td>2.30763868197</td><td>-1.0</td><td>0.346182279084</td><td>2.31230791362</td><td>2.30638494927</td><td>2.3046866469</td><td>0</td><td>2199023796224</td><td>0</td><td>0</td><td>0</td><td>0</td><td>-1 .. -1</td><td>-1 .. -1</td><td>-1 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>0.537336213179</td><td>0.779484925454</td><td>-1.0 .. -1.0</td><td>0.58568293642</td><td>0.915501904005</td><td>-1.0</td><td>4278.7900341</td><td>1595.2886496</td><td>2683.5013845</td><td>2.15328741853</td><td>44.0028643812</td><td>1.40097166147</td><td>3575.00108901</td><td>1554.12165803</td><td>2020.87943097</td><td>0.706666936497</td><td>38.4285671721</td><td>15.8517240349</td><td>7996.40388327</td><td>4579.19012749</td><td>3417.21375578</td><td>0.223279535625</td><td>69.3860000703</td><td>17.8808108042</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>7713</td><td>54741</td><td>301</td><td>4</td><td>231</td><td>1237678601842131080</td><td>1.03847694397 .. 2.65843176842</td><td>12.3596630096 .. 0.852828204632</td><td>22.4397926331 .. 21.3626842499</td><td>0.28713452816 .. 0.386405169964</td><td>1.03847694397 .. 2.65843176842</td><td>-23.882931269</td><td>-0.0820910409093</td><td>0.146194890141 .. 0.0419441759586</td><td>0.113614 .. 0.0338511</td><td>21.9297126138</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.302318871021</td><td>8.78557314038</td><td>0.727564871311</td><td>4.53735896492</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-1</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-11-07</td><td>2100.0</td><td>2.308</td><td>-1.0</td><td>BOSS_PCA</td><td>QSO</td><td>0</td><td>spec-6173-56238-0528.fits.gz</td><td>4556</td><td>3605.0</td><td>10289.6</td><td>0</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>000000.66+145828.8</td><td>0.0028</td><td>14.9747</td><td>245101352</td><td>6177</td><td>56268</td><td>595</td><td>2.49794077873</td><td>2.49794077873</td><td>0.00087528018048</td><td>0</td><td>2.5158747041</td><td>0.00152614617889</td><td>0.0637837702159</td><td>2.49650563784</td><td>2.48943398984</td><td>-1.0</td><td>0</td><td>2199023255552</td><td>0</td><td>0</td><td>0</td><td>1</td><td>6172 .. -1</td><td>56269 .. -1</td><td>366 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>-1.02687764161</td><td>3.50091459041</td><td>3.17286659113 .. -1.0</td><td>2.83518425232</td><td>1.00020946838</td><td>-1.0</td><td>5336.1138803</td><td>2014.51203621</td><td>3321.60184409</td><td>3.35973519002</td><td>23.5146308167</td><td>0.61035250618</td><td>9292.63026767</td><td>4320.17455664</td><td>4972.45571103</td><td>1.94089573578</td><td>24.2927232211</td><td>1.93123733219</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2566</td><td>52170</td><td>301</td><td>4</td><td>309</td><td>1237656495650570598</td><td>1.6516559124 .. 5.42984771729</td><td>15.6462879181 .. 0.83617079258</td><td>21.9474830627 .. 20.643404007</td><td>0.163849979639 .. 0.210973441601</td><td>-1.0 .. -1.0</td><td>-25.2306891586</td><td>0.348158091307</td><td>0.198727145791 .. 0.0570159889758</td><td>0.113059 .. 0.0336857</td><td>21.9413001969</td><td>3</td><td>3.38717365265</td><td>0.0859531164169</td><td>0.117734603584</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.0463186129928</td><td>701.104283731</td><td>0.0525297634304</td><td>384.750962198</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>1</td><td>1.86038e-31</td><td>3.14768e-32</td><td>2.31095e-31</td><td>4.56533e-32</td><td>2.35531e-31</td><td>5.97048e-32</td><td>2.42715e-31</td><td>6.52172e-32</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-12-07</td><td>2100.0</td><td>2.516</td><td>0.00152614617889</td><td>BOSS_PCA</td><td>QSO</td><td>1</td><td>spec-6177-56268-0595.fits.gz</td><td>4554</td><td>3605.8</td><td>10287.3</td><td>1</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>000000.97+044947.2</td><td>0.0041</td><td>4.8298</td><td>154279486</td><td>4415</td><td>55831</td><td>464</td><td>1.61884605885</td><td>1.61884605885</td><td>0.000585458008572</td><td>0</td><td>1.62861043214</td><td>0.000518233828123</td><td>0.0515782360318</td><td>-1.0</td><td>1.62392937561</td><td>1.62986379892</td><td>0</td><td>2199023910912</td><td>0</td><td>0</td><td>0</td><td>0</td><td>-1 .. -1</td><td>-1 .. -1</td><td>-1 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>-0.281249716967</td><td>7.11018367836</td><td>-1.0 .. -1.0</td><td>1.26814974223</td><td>13.8079141452</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>5863.20521905</td><td>1992.14674007</td><td>3871.05847897</td><td>4.39195264612</td><td>26.8087449013</td><td>1.08748973709</td><td>2443.60056629</td><td>1249.45778705</td><td>1194.14277924</td><td>5.28947926376</td><td>34.7988813362</td><td>1.12838363307</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>7754</td><td>54764</td><td>301</td><td>3</td><td>314</td><td>1237678777404358776</td><td>6.64573383331 .. 19.904340744</td><td>7.15662431717 .. 0.524855673313</td><td>20.4431610107 .. 19.2511329651</td><td>0.0610157772899 .. 0.0750860571861</td><td>-1.0 .. -1.0</td><td>-25.6002618809</td><td>0.259628534317</td><td>0.169288620353 .. 0.048569906503</td><td>0.0706297 .. 0.0210439</td><td>21.984099559</td><td>3</td><td>3.0460691452</td><td>0.00874528381974</td><td>1.38586497307</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.349308043718</td><td>22.5872342774</td><td>1.57329285145</td><td>13.871135159</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>15.503</td><td>0.0439999997616</td><td>24.5</td><td>0.9052</td><td>13.987</td><td>0.0439999997616</td><td>24.5</td><td>0.913</td><td>10.764</td><td>0.112000003457</td><td>9.7</td><td>0.9418</td><td>8.056</td><td>0.204999998212</td><td>5.3</td><td>0.0</td><td>0000</td><td>AABB</td><td>0.2685124497</td><td>1</td><td>5.52544e-31</td><td>3.59559e-32</td><td>6.5975e-31</td><td>4.15465e-32</td><td>9.03816e-31</td><td>4.42033e-32</td><td>8.56743e-31</td><td>5.17877e-32</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2011-09-27</td><td>2100.0</td><td>1.629</td><td>0.000518233828123</td><td>BOSS_PCA</td><td>QSO</td><td>2</td><td>spec-4415-55831-0464.fits.gz</td><td>4606</td><td>3557.1</td><td>10270.7</td><td>2</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=3>\n",
       "    SDSS_NAME      RA_GROUP DEC_GROUP ... flux1450 fluxerror1450 skyflag\n",
       "      str18        float64   float64  ... float32     float32     int32 \n",
       "------------------ -------- --------- ... -------- ------------- -------\n",
       "000000.45+174625.4   0.0019   17.7737 ...       --            --      --\n",
       "000000.66+145828.8   0.0028   14.9747 ...       --            --      --\n",
       "000000.97+044947.2   0.0041    4.8298 ...       --            --      --"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta = sdb.meta_from_position((2.813500,14.767200), 20*u.deg)\n",
    "meta[0:3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "masked_BaseColumn(data = ['BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'BOSS_DR12' 'HD-LLS_DR1'\n",
       " 'HD-LLS_DR1' 'GGG' 'GGG' 'GGG' 'GGG' 'SDSS_DR7' 'SDSS_DR7' 'SDSS_DR7'\n",
       " 'SDSS_DR7'],\n",
       "                  mask = [False False False False False False False False False False False False\n",
       " False False False],\n",
       "            fill_value = N/A)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta['GROUP'].data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Restrict on groups"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 3 match[es] within radius=20 deg\n"
     ]
    }
   ],
   "source": [
    "meta = sdb.meta_from_position((2.813500,14.767200), 20*u.deg, groups=['GGG','HD-LLS_DR1'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "masked_BaseColumn(data = ['HD-LLS_DR1' 'HD-LLS_DR1' 'GGG' 'GGG' 'GGG' 'GGG'],\n",
       "                  mask = [False False False False False False],\n",
       "            fill_value = N/A)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "meta['GROUP'].data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "----"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Query Meta with Coordinates list\n",
    "    When querying with a coordinate list, there are two approaches to \n",
    "    the data returned.  The default is to return the meta data\n",
    "    for the first spectrum matched to each coordinate.\n",
    "    \n",
    "    The other option is to retrieve all of the meta data for each \n",
    "    coordinate input.  The returned object is then a list of bool arrays\n",
    "    and a Table of all the meta data.\n",
    "    \n",
    "    We provide examples for each."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Meta for first match for each coordinate\n",
    "    Returns a Table with a single meta data entry per coordinate even if multiple exist.\n",
    "    If there is no match, the row is empty in the Table.\n",
    "\n",
    "    If there are zero matches, return None."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Single source (which matches)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 matches from 1 input coordinates\n",
      "Final query yielded 1 matches.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=1&gt;\n",
       "<table id=\"table4638340624\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str9</th><th>str3</th><th>int64</th><th>str28</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str4</th><th>str4</th><th>str10</th><th>str9</th></tr></thead>\n",
       "<tr><td>000000.45+174625.4</td><td>0.00189828518376</td><td>17.7737391299</td><td>268514930</td><td>6173</td><td>56238</td><td>528</td><td>2.30909729004</td><td>2.30909729004</td><td>0.000943339022342</td><td>0</td><td>2.30763868197</td><td>-1.0</td><td>0.346182279084</td><td>2.31230791362</td><td>2.30638494927</td><td>2.3046866469</td><td>0</td><td>2199023796224</td><td>0</td><td>0</td><td>0</td><td>0</td><td>-1 .. -1</td><td>-1 .. -1</td><td>-1 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>0.537336213179</td><td>0.779484925454</td><td>-1.0 .. -1.0</td><td>0.58568293642</td><td>0.915501904005</td><td>-1.0</td><td>4278.7900341</td><td>1595.2886496</td><td>2683.5013845</td><td>2.15328741853</td><td>44.0028643812</td><td>1.40097166147</td><td>3575.00108901</td><td>1554.12165803</td><td>2020.87943097</td><td>0.706666936497</td><td>38.4285671721</td><td>15.8517240349</td><td>7996.40388327</td><td>4579.19012749</td><td>3417.21375578</td><td>0.223279535625</td><td>69.3860000703</td><td>17.8808108042</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>7713</td><td>54741</td><td>301</td><td>4</td><td>231</td><td>1237678601842131080</td><td>1.03847694397 .. 2.65843176842</td><td>12.3596630096 .. 0.852828204632</td><td>22.4397926331 .. 21.3626842499</td><td>0.28713452816 .. 0.386405169964</td><td>1.03847694397 .. 2.65843176842</td><td>-23.882931269</td><td>-0.0820910409093</td><td>0.146194890141 .. 0.0419441759586</td><td>0.113614 .. 0.0338511</td><td>21.9297126138</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.302318871021</td><td>8.78557314038</td><td>0.727564871311</td><td>4.53735896492</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>-1</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-11-07</td><td>2100.0</td><td>2.30763868197</td><td>-1.0</td><td>BOSS_PCA</td><td>QSO</td><td>0</td><td>spec-6173-56238-0528.fits.gz</td><td>4556</td><td>3604.95654297</td><td>10289.6396484</td><td>0</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=1>\n",
       "    SDSS_NAME          RA_GROUP       DEC_GROUP   ... TELESCOPE    GROUP  \n",
       "      str18            float64         float64    ...   str10       str9  \n",
       "------------------ ---------------- ------------- ... ---------- ---------\n",
       "000000.45+174625.4 0.00189828518376 17.7737391299 ... SDSS 2.5-M BOSS_DR12"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coord = SkyCoord(ra=0.0019, dec=17.7737, unit='deg')\n",
    "matches, meta = sdb.meta_from_coords(coord)\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Single source which fails to match"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 0 matches from 1 input coordinates\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "coord = SkyCoord(ra=0.0019, dec=-17.7737, unit='deg')\n",
    "matches, meta = sdb.meta_from_coords(coord)\n",
    "print(meta)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Source where multiple spectra exist, but only the first record is returned"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 matches from 1 input coordinates\n",
      "Final query yielded 1 matches.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=1&gt;\n",
       "<table id=\"table4635489936\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSSJ</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAG</th><th>JMAGERR</th><th>HMAG</th><th>HMAGERR</th><th>KMAG</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>DGMI</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>PLATE</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>EPOCH</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>TELESCOPE</th><th>INSTR</th><th>DATE-OBS</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>R</th><th>GROUP_ID</th><th>DISPERSER</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>str3</th><th>float64</th><th>str3</th><th>int64</th><th>str27</th><th>str12</th><th>str6</th><th>str10</th><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>int64</th><th>str4</th><th>str3</th></tr></thead>\n",
       "<tr><td>001115.23+144601.8</td><td>2.813485</td><td>14.767169</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>17.547</td><td>0.342</td><td>16.76</td><td>0.257</td><td>15.796</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>-0.922</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>751</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td><td>4.97</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>Gemini-North</td><td>GMOS-N</td><td>2011-05-25</td><td>1583</td><td>4911.02528934</td><td>7831.05124185</td><td>940.0</td><td>0</td><td>B600</td><td>GGG</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=1>\n",
       "      SDSSJ        RA_GROUP DEC_GROUP  z_s10  ... GROUP_ID DISPERSER GROUP\n",
       "      str31        float64   float64  float64 ...  int64      str4    str3\n",
       "------------------ -------- --------- ------- ... -------- --------- -----\n",
       "001115.23+144601.8 2.813485 14.767169  4.9672 ...        0      B600   GGG"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coord = SkyCoord(ra=2.813458, dec=14.767167, unit='deg')\n",
    "_, meta = sdb.meta_from_coords(coord)\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Multiple coordinates, each matched"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 2 matches from 2 input coordinates\n",
      "Final query yielded 2 matches.\n",
      "[ True  True]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=2&gt;\n",
       "<table id=\"table4652581520\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th><th>SDSSJ</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAGERR</th><th>HMAGERR</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str9</th><th>str3</th><th>int64</th><th>str28</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str6</th><th>str4</th><th>str12</th><th>str9</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th></tr></thead>\n",
       "<tr><td>000000.66+145828.8</td><td>0.00275643009297</td><td>14.9746754937</td><td>245101352</td><td>6177</td><td>56268</td><td>595</td><td>2.49794077873</td><td>2.49794077873</td><td>0.00087528018048</td><td>0</td><td>2.5158747041</td><td>0.00152614617889</td><td>0.0637837702159</td><td>2.49650563784</td><td>2.48943398984</td><td>-1.0</td><td>0</td><td>2199023255552</td><td>0</td><td>0</td><td>0</td><td>1</td><td>6172 .. -1</td><td>56269 .. -1</td><td>366 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>-1.02687764161</td><td>3.50091459041</td><td>3.17286659113 .. -1.0</td><td>2.83518425232</td><td>1.00020946838</td><td>-1.0</td><td>5336.1138803</td><td>2014.51203621</td><td>3321.60184409</td><td>3.35973519002</td><td>23.5146308167</td><td>0.61035250618</td><td>9292.63026767</td><td>4320.17455664</td><td>4972.45571103</td><td>1.94089573578</td><td>24.2927232211</td><td>1.93123733219</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2566</td><td>52170</td><td>301</td><td>4</td><td>309</td><td>1237656495650570598</td><td>1.6516559124 .. 5.42984771729</td><td>15.6462879181 .. 0.83617079258</td><td>21.9474830627 .. 20.643404007</td><td>0.163849979639 .. 0.210973441601</td><td>-1.0 .. -1.0</td><td>-25.2306891586</td><td>0.348158091307</td><td>0.198727145791 .. 0.0570159889758</td><td>0.113059 .. 0.0336857</td><td>21.9413001969</td><td>3</td><td>3.38717365265</td><td>0.0859531164169</td><td>0.117734603584</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.0463186129928</td><td>701.104283731</td><td>0.0525297634304</td><td>384.750962198</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>1</td><td>1.86038e-31</td><td>3.14768e-32</td><td>2.31095e-31</td><td>4.56533e-32</td><td>2.35531e-31</td><td>5.97048e-32</td><td>2.42715e-31</td><td>6.52172e-32</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-12-07</td><td>2100.0</td><td>2.5158747041</td><td>0.00152614617889</td><td>BOSS_PCA</td><td>QSO</td><td>1</td><td>spec-6177-56268-0595.fits.gz</td><td>4554</td><td>3605.78588867</td><td>10287.2666016</td><td>1</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>--</td><td>2.813485</td><td>14.767169</td><td>--</td><td>751</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>-0.922</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>17.547</td><td>--</td><td>--</td><td>--</td><td>16.76</td><td>--</td><td>--</td><td>--</td><td>15.796</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>2011-05-25</td><td>940.0</td><td>4.96999979019</td><td>0.00499999988824</td><td>GGG</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>1583</td><td>4911.02528934</td><td>7831.05124185</td><td>0</td><td>2000.0</td><td>--</td><td>GMOS-N</td><td>B600</td><td>Gemini-North</td><td>GGG</td><td>001115.23+144601.8</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>0.342</td><td>0.257</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=2>\n",
       "    SDSS_NAME          RA_GROUP       DEC_GROUP   ... fluxerror1450 skyflag\n",
       "      str18            float64         float64    ...    float32     int32 \n",
       "------------------ ---------------- ------------- ... ------------- -------\n",
       "000000.66+145828.8 0.00275643009297 14.9746754937 ...            --      --\n",
       "                --         2.813485     14.767169 ...      0.208254       0"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coords = SkyCoord(ra=[0.0028,2.813458], dec=[14.9747,14.767167], unit='deg')\n",
    "matches, meta = sdb.meta_from_coords(coords)\n",
    "print(matches)\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Multiple coordinates, one fails to match by coordinate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 2 matches from 3 input coordinates\n",
      "Final query yielded 2 matches.\n",
      "[ True False  True]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=3&gt;\n",
       "<table id=\"table4627689680\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th><th>SDSSJ</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAGERR</th><th>HMAGERR</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str9</th><th>str3</th><th>int64</th><th>str28</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str6</th><th>str4</th><th>str12</th><th>str9</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th></tr></thead>\n",
       "<tr><td>000000.66+145828.8</td><td>0.00275643009297</td><td>14.9746754937</td><td>245101352</td><td>6177</td><td>56268</td><td>595</td><td>2.49794077873</td><td>2.49794077873</td><td>0.00087528018048</td><td>0</td><td>2.5158747041</td><td>0.00152614617889</td><td>0.0637837702159</td><td>2.49650563784</td><td>2.48943398984</td><td>-1.0</td><td>0</td><td>2199023255552</td><td>0</td><td>0</td><td>0</td><td>1</td><td>6172 .. -1</td><td>56269 .. -1</td><td>366 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>-1.02687764161</td><td>3.50091459041</td><td>3.17286659113 .. -1.0</td><td>2.83518425232</td><td>1.00020946838</td><td>-1.0</td><td>5336.1138803</td><td>2014.51203621</td><td>3321.60184409</td><td>3.35973519002</td><td>23.5146308167</td><td>0.61035250618</td><td>9292.63026767</td><td>4320.17455664</td><td>4972.45571103</td><td>1.94089573578</td><td>24.2927232211</td><td>1.93123733219</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2566</td><td>52170</td><td>301</td><td>4</td><td>309</td><td>1237656495650570598</td><td>1.6516559124 .. 5.42984771729</td><td>15.6462879181 .. 0.83617079258</td><td>21.9474830627 .. 20.643404007</td><td>0.163849979639 .. 0.210973441601</td><td>-1.0 .. -1.0</td><td>-25.2306891586</td><td>0.348158091307</td><td>0.198727145791 .. 0.0570159889758</td><td>0.113059 .. 0.0336857</td><td>21.9413001969</td><td>3</td><td>3.38717365265</td><td>0.0859531164169</td><td>0.117734603584</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.0463186129928</td><td>701.104283731</td><td>0.0525297634304</td><td>384.750962198</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>1</td><td>1.86038e-31</td><td>3.14768e-32</td><td>2.31095e-31</td><td>4.56533e-32</td><td>2.35531e-31</td><td>5.97048e-32</td><td>2.42715e-31</td><td>6.52172e-32</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-12-07</td><td>2100.0</td><td>2.5158747041</td><td>0.00152614617889</td><td>BOSS_PCA</td><td>QSO</td><td>1</td><td>spec-6177-56268-0595.fits.gz</td><td>4554</td><td>3605.78588867</td><td>10287.2666016</td><td>1</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-1</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>--</td><td>2.813485</td><td>14.767169</td><td>--</td><td>751</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>-0.922</td><td>-- .. --</td><td>-- .. --</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>17.547</td><td>--</td><td>--</td><td>--</td><td>16.76</td><td>--</td><td>--</td><td>--</td><td>15.796</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>2011-05-25</td><td>940.0</td><td>4.96999979019</td><td>0.00499999988824</td><td>GGG</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>1583</td><td>4911.02528934</td><td>7831.05124185</td><td>0</td><td>2000.0</td><td>--</td><td>GMOS-N</td><td>B600</td><td>Gemini-North</td><td>GGG</td><td>001115.23+144601.8</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>0.342</td><td>0.257</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=3>\n",
       "    SDSS_NAME          RA_GROUP       DEC_GROUP   ... fluxerror1450 skyflag\n",
       "      str18            float64         float64    ...    float32     int32 \n",
       "------------------ ---------------- ------------- ... ------------- -------\n",
       "000000.66+145828.8 0.00275643009297 14.9746754937 ...            --      --\n",
       "                --               --            -- ...            --      --\n",
       "                --         2.813485     14.767169 ...      0.208254       0"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coords = SkyCoord(ra=[0.0028,9.99,2.813458], dec=[14.9747,-9.99,14.767167], unit='deg')\n",
    "matches, meta = sdb.meta_from_coords(coords)\n",
    "print(matches)\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Multiple coordiantes, one fails to match input group list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 matches from 2 input coordinates\n",
      "Final query yielded 1 matches.\n",
      "[False  True]\n",
      "IGM_ID\n",
      "------\n",
      "    -2\n",
      "  3244\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=2&gt;\n",
       "<table id=\"table4648122640\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSSJ</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAG</th><th>JMAGERR</th><th>HMAG</th><th>HMAGERR</th><th>KMAG</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>DGMI</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>PLATE</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>EPOCH</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>TELESCOPE</th><th>INSTR</th><th>DATE-OBS</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>R</th><th>GROUP_ID</th><th>DISPERSER</th><th>GROUP</th></tr></thead>\n",
       "<thead><tr><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>str3</th><th>float64</th><th>str3</th><th>int64</th><th>str27</th><th>str12</th><th>str6</th><th>str10</th><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>int64</th><th>str4</th><th>str3</th></tr></thead>\n",
       "<tr><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>-2</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "<tr><td>001115.23+144601.8</td><td>2.813485</td><td>14.767169</td><td>4.9672</td><td>24.087</td><td>0.827</td><td>22.081</td><td>0.074</td><td>19.617</td><td>0.021</td><td>18.277</td><td>0.014</td><td>18.101</td><td>0.025</td><td>0.272</td><td>20.643</td><td>-1.0</td><td>0.0</td><td>0.0</td><td>-9.0</td><td>0.0</td><td>0.0</td><td>17.547</td><td>0.342</td><td>16.76</td><td>0.257</td><td>15.796</td><td>0.244</td><td>0.0</td><td>26</td><td>-29.191</td><td>-0.922</td><td>0</td><td>1</td><td>1</td><td>1</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>2566</td><td>52170</td><td>52251</td><td>751</td><td>39</td><td>40</td><td>3</td><td>327</td><td>266</td><td>8388609</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>0</td><td>0</td><td>24.385</td><td>0.941</td><td>22.071</td><td>0.073</td><td>19.642</td><td>0.018</td><td>18.271</td><td>0.013</td><td>18.14</td><td>0.023</td><td>587730773889974538</td><td>211612124009463808</td><td>SDSS J001115.23+144601.8</td><td>1.934192</td><td>2.409056</td><td>1.304912</td><td>0.143904</td><td>2.242192</td><td>2.374056</td><td>1.335912</td><td>0.098904</td><td>SDSSJ0011+1446</td><td>0.0527643064985</td><td>4.9736</td><td>5</td><td>2</td><td>640</td><td>860</td><td>4.97</td><td>0.005</td><td>0</td><td>8.6155</td><td>0.208254</td><td>0</td><td>4.97</td><td>0.005</td><td>GGG</td><td>2000.0</td><td>QSO</td><td>3244</td><td>SDSSJ0011+1446_B600.fits.gz</td><td>Gemini-North</td><td>GMOS-N</td><td>2011-05-25</td><td>1583</td><td>4911.02528934</td><td>7831.05124185</td><td>940.0</td><td>0</td><td>B600</td><td>GGG</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=2>\n",
       "      SDSSJ        RA_GROUP DEC_GROUP  z_s10  ... GROUP_ID DISPERSER GROUP\n",
       "      str31        float64   float64  float64 ...  int64      str4    str3\n",
       "------------------ -------- --------- ------- ... -------- --------- -----\n",
       "                --       --        --      -- ...       --        --    --\n",
       "001115.23+144601.8 2.813485 14.767169  4.9672 ...        0      B600   GGG"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coords = SkyCoord(ra=[0.0028,2.813458], dec=[14.9747,14.767167], unit='deg')\n",
    "matches, meta = sdb.meta_from_coords(coords, groups=['GGG'])\n",
    "print(matches)\n",
    "print(meta['IGM_ID'])\n",
    "meta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### All Meta Data for each input coordinate\n",
    "    Here, a list of bool arrays relative to stacked meta table is returned.\n",
    "    This is a bit convoluted, but is *much* faster for large coordinate lists.\n",
    "    If there is no match to a given coordinate, the entry in the list is None"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Two sources.  The second one has two spectra in the database"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 2 matches from 2 input coordinates\n",
      "('Matches = ', array([ True,  True], dtype=bool))\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "([masked_array(data = [True False False],\n",
       "               mask = [False False False],\n",
       "         fill_value = True), masked_array(data = [False True True],\n",
       "               mask = [False False False],\n",
       "         fill_value = True)], <Table masked=True length=1>\n",
       "     SDSS_NAME      RA_GROUP DEC_GROUP ... flux1450 fluxerror1450 skyflag\n",
       "       str18        float64   float64  ... float32     float32     int32 \n",
       " ------------------ -------- --------- ... -------- ------------- -------\n",
       " 000000.66+145828.8   0.0028   14.9747 ...       --            --      --)"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coords = SkyCoord(ra=[0.0028,2.813458], dec=[14.9747,14.767167], unit='deg')\n",
    "matches, list_of_meta, meta_stack = sdb.meta_from_coords(coords, first=False)\n",
    "print('Matches = ', matches)\n",
    "list_of_meta, meta_stack[list_of_meta[0]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Two sources, limit by groups"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 1 matches from 2 input coordinates\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "([None, array([ True,  True], dtype=bool)], <Table length=2>\n",
       "       SDSSJ        RA_GROUP DEC_GROUP  z_s10  ... GROUP_ID DISPERSER GROUP\n",
       "       str31        float64   float64  float64 ...  int64      str4    str3\n",
       " ------------------ -------- --------- ------- ... -------- --------- -----\n",
       " 001115.23+144601.8   2.8135   14.7672  4.9672 ...        0      B600   GGG\n",
       " 001115.23+144601.8   2.8135   14.7672  4.9672 ...      163      R400   GGG)"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "matches, list_of_meta, meta_stack = sdb.meta_from_coords(coords, first=False, groups=['GGG'])\n",
    "list_of_meta, meta_stack[list_of_meta[1]]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Three sources; second one has no match"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your search yielded 2 matches from 3 input coordinates\n",
      "('Matches = ', array([ True, False,  True], dtype=bool))\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "&lt;Table masked=True length=1&gt;\n",
       "<table id=\"table4653555024\" class=\"table-striped table-bordered table-condensed\">\n",
       "<thead><tr><th>SDSS_NAME</th><th>RA_GROUP</th><th>DEC_GROUP</th><th>THING_ID</th><th>PLATE</th><th>MJD</th><th>FIBERID</th><th>Z_VI</th><th>Z_PIPE</th><th>ERR_ZPIPE</th><th>ZWARNING</th><th>Z_PCA</th><th>ERR_ZPCA</th><th>PCA_QUAL</th><th>Z_CIV</th><th>Z_CIII</th><th>Z_MGII</th><th>SDSS_MORPHO</th><th>BOSS_TARGET1</th><th>ANCILLARY_TARGET1</th><th>ANCILLARY_TARGET2</th><th>EBOSS_TARGET0</th><th>NSPEC_BOSS</th><th>PLATE_DUPLICATE [32]</th><th>MJD_DUPLICATE [32]</th><th>FIBERID_DUPLICATE [32]</th><th>SDSS_DR7</th><th>PLATE_DR7</th><th>MJD_DR7</th><th>FIBERID_DR7</th><th>UNIFORM</th><th>ALPHA_NU</th><th>SNR_SPEC</th><th>SNR_DUPLICATE [32]</th><th>SNR_1700</th><th>SNR_3000</th><th>SNR_5150</th><th>FWHM_CIV</th><th>BHWHM_CIV</th><th>RHWHM_CIV</th><th>AMP_CIV</th><th>REWE_CIV</th><th>ERR_REWE_CIV</th><th>FWHM_CIII</th><th>BHWHM_CIII</th><th>RHWHM_CIII</th><th>AMP_CIII</th><th>REWE_CIII</th><th>ERR_REWE_CIII</th><th>FWHM_MGII</th><th>BHWHM_MGII</th><th>RHWHM_MGII</th><th>AMP_MGII</th><th>REWE_MGII</th><th>ERR_REWE_MGII</th><th>BAL_FLAG_VI</th><th>BI_CIV</th><th>ERR_BI_CIV</th><th>AI_CIV</th><th>ERR_AI_CIV</th><th>CHI2TROUGH</th><th>NCIV_2000</th><th>VMIN_CIV_2000</th><th>VMAX_CIV_2000</th><th>NCIV_450</th><th>VMIN_CIV_450</th><th>VMAX_CIV_450</th><th>REW_SIIV</th><th>REW_CIV</th><th>REW_ALIII</th><th>RUN_NUMBER</th><th>PHOTO_MJD</th><th>RERUN_NUMBER</th><th>COL_NUMBER</th><th>FIELD_NUMBER</th><th>OBJ_ID</th><th>PSFFLUX [5]</th><th>IVAR_PSFFLUX [5]</th><th>PSFMAG [5]</th><th>ERR_PSFMAG [5]</th><th>TARGET_FLUX [5]</th><th>MI</th><th>DGMI</th><th>EXTINCTION [5]</th><th>EXTINCTION_RECAL [5]</th><th>HI_GAL</th><th>VAR_MATCHED</th><th>VAR_CHI2</th><th>VAR_A</th><th>VAR_GAMMA</th><th>RASS_COUNTS</th><th>RASS_COUNTS_SNR</th><th>SDSS2ROSAT_SEP</th><th>N_DETECTION_XMM</th><th>FLUX02_12KEV_SGL</th><th>ERR_FLUX02_12KEV_SGL</th><th>FLUX02_2KEV</th><th>ERR_FLUX02_2KEV</th><th>FLUX2_12KEV</th><th>ERR_FLUX2_12KEV</th><th>FLUX02_12KEV</th><th>ERR_FLUX02_12KEV</th><th>LUM02_2KEV_SGL</th><th>LUM05_2KEV</th><th>LUM2_12KEV</th><th>LUM02_2KEV</th><th>LUMX2_10_UPPER</th><th>SDSS2XMM_SEP</th><th>GALEX_MATCHED</th><th>FUV</th><th>FUV_IVAR</th><th>NUV</th><th>NUV_IVAR</th><th>JMAG</th><th>ERR_JMAG</th><th>JSNR</th><th>JRDFLAG</th><th>HMAG</th><th>ERR_HMAG</th><th>HSNR</th><th>HRDFLAG</th><th>KMAG</th><th>ERR_KMAG</th><th>KSNR</th><th>KRDFLAG</th><th>SDSS2MASS_SEP</th><th>W1MAG</th><th>ERR_W1MAG</th><th>W1SNR</th><th>W1CHI2</th><th>W2MAG</th><th>ERR_W2MAG</th><th>W2SNR</th><th>W2CHI2</th><th>W3MAG</th><th>ERR_W3MAG</th><th>W3SNR</th><th>W3CHI2</th><th>W4MAG</th><th>ERR_W4MAG</th><th>W4SNR</th><th>W4CHI2</th><th>CC_FLAGS</th><th>PH_FLAG</th><th>SDSS2WISE_SEP</th><th>UKIDSS_MATCHED</th><th>YFLUX</th><th>YFLUX_ERR</th><th>JFLUX</th><th>JFLUX_ERR</th><th>HFLUX</th><th>HFLUX_ERR</th><th>KFLUX</th><th>KFLUX_ERR</th><th>FIRST_MATCHED</th><th>FIRST_FLUX</th><th>FIRST_SNR</th><th>SDSS2FIRST_SEP</th><th>DATE-OBS</th><th>R</th><th>zem_GROUP</th><th>sig_zem</th><th>flag_zem</th><th>STYPE</th><th>IGM_ID</th><th>SPEC_FILE</th><th>NPIX</th><th>WV_MIN</th><th>WV_MAX</th><th>GROUP_ID</th><th>EPOCH</th><th>CAT</th><th>INSTR</th><th>DISPERSER</th><th>TELESCOPE</th><th>GROUP</th><th>SDSSJ</th><th>z_s10</th><th>UMAG</th><th>UMAGERR</th><th>GMAG</th><th>GMAGERR</th><th>RMAG</th><th>RMAGERR</th><th>IMAG</th><th>IMAGERR</th><th>ZMAG</th><th>ZMAGERR</th><th>AU</th><th>logNH</th><th>FIRSTMAG</th><th>FIRSTSN</th><th>FIRSTDEL</th><th>RASSCNT</th><th>RASSSN</th><th>RASSDEL</th><th>JMAGERR</th><th>HMAGERR</th><th>KMAGERR</th><th>MASSDEL</th><th>MASSFLG</th><th>MIMAG</th><th>MFLAG</th><th>SPFLAG</th><th>MODEFLAG</th><th>USELFLAG</th><th>BESTFLAG</th><th>LZFLAG</th><th>HZFLAG</th><th>FTFLAG</th><th>RTFLAG</th><th>SRFLAG</th><th>STFLAG</th><th>GXFLAG</th><th>RUN</th><th>RMJD</th><th>SMJD</th><th>FIBER</th><th>RERUN</th><th>CAMCOL</th><th>FIELD</th><th>OBJECT</th><th>TFLAG</th><th>LZTFLAG</th><th>HZTFLAG</th><th>FTTFLAG</th><th>RTTFLAG</th><th>SRTFLAG</th><th>STTFLAG</th><th>GXTFLAG</th><th>UTMAG</th><th>UTMAGERR</th><th>GTMAG</th><th>GTMAGERR</th><th>RTMAG</th><th>RTMAGERR</th><th>ITMAG</th><th>ITMAGERR</th><th>ZTMAG</th><th>ZTMAGERR</th><th>BESTID</th><th>SPECOID</th><th>ONAME</th><th>u_minus_g</th><th>g_minus_r</th><th>r_minus_i</th><th>i_minus_z</th><th>t_u_minus_g</th><th>t_g_minus_r</th><th>t_r_minus_i</th><th>t_i_minus_z</th><th>name</th><th>ebv</th><th>z_hw10</th><th>method_hw10</th><th>telsemester</th><th>cw_b600</th><th>cw_r400</th><th>z_gmos</th><th>zerror_gmos</th><th>absflag</th><th>flux1450</th><th>fluxerror1450</th><th>skyflag</th></tr></thead>\n",
       "<thead><tr><th>str18</th><th>float64</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>int64</th><th>int64</th><th>int64</th><th>int64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>int32</th><th>str3</th><th>int16</th><th>int16</th><th>str19</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float32</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int16</th><th>float64</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str4</th><th>str4</th><th>float64</th><th>int16</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>float32</th><th>int16</th><th>float64</th><th>float64</th><th>float64</th><th>str10</th><th>float64</th><th>float64</th><th>float64</th><th>str9</th><th>str3</th><th>int64</th><th>str28</th><th>int64</th><th>float64</th><th>float64</th><th>int64</th><th>float64</th><th>str5</th><th>str6</th><th>str4</th><th>str12</th><th>str9</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>int32</th><th>float64</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str31</th><th>str31</th><th>str31</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>str14</th><th>float64</th><th>float32</th><th>int32</th><th>int32</th><th>int32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th><th>float32</th><th>float32</th><th>int32</th></tr></thead>\n",
       "<tr><td>000000.66+145828.8</td><td>0.0028</td><td>14.9747</td><td>245101352</td><td>6177</td><td>56268</td><td>595</td><td>2.49794077873</td><td>2.49794077873</td><td>0.00087528018048</td><td>0</td><td>2.5158747041</td><td>0.00152614617889</td><td>0.0637837702159</td><td>2.49650563784</td><td>2.48943398984</td><td>-1.0</td><td>0</td><td>2199023255552</td><td>0</td><td>0</td><td>0</td><td>1</td><td>6172 .. -1</td><td>56269 .. -1</td><td>366 .. -1</td><td>0</td><td>-1</td><td>-1</td><td>-1</td><td>0</td><td>-1.02687764161</td><td>3.50091459041</td><td>3.17286659113 .. -1.0</td><td>2.83518425232</td><td>1.00020946838</td><td>-1.0</td><td>5336.1138803</td><td>2014.51203621</td><td>3321.60184409</td><td>3.35973519002</td><td>23.5146308167</td><td>0.61035250618</td><td>9292.63026767</td><td>4320.17455664</td><td>4972.45571103</td><td>1.94089573578</td><td>24.2927232211</td><td>1.93123733219</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>-1.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2566</td><td>52170</td><td>301</td><td>4</td><td>309</td><td>1237656495650570598</td><td>1.6516559124 .. 5.42984771729</td><td>15.6462879181 .. 0.83617079258</td><td>21.9474830627 .. 20.643404007</td><td>0.163849979639 .. 0.210973441601</td><td>-1.0 .. -1.0</td><td>-25.2306891586</td><td>0.348158091307</td><td>0.198727145791 .. 0.0570159889758</td><td>0.113059 .. 0.0336857</td><td>21.9413001969</td><td>3</td><td>3.38717365265</td><td>0.0859531164169</td><td>0.117734603584</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>1</td><td>0.0463186129928</td><td>701.104283731</td><td>0.0525297634304</td><td>384.750962198</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>0.0</td><td>1</td><td>1.86038e-31</td><td>3.14768e-32</td><td>2.31095e-31</td><td>4.56533e-32</td><td>2.35531e-31</td><td>5.97048e-32</td><td>2.42715e-31</td><td>6.52172e-32</td><td>0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2012-12-07</td><td>2100.0</td><td>2.516</td><td>0.00152614617889</td><td>BOSS_PCA</td><td>QSO</td><td>1</td><td>spec-6177-56268-0595.fits.gz</td><td>4554</td><td>3605.8</td><td>10287.3</td><td>1</td><td>2000.0</td><td>DR12Q</td><td>BOSS</td><td>BOTH</td><td>SDSS 2.5-M</td><td>BOSS_DR12</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td></tr>\n",
       "</table>"
      ],
      "text/plain": [
       "<Table masked=True length=1>\n",
       "    SDSS_NAME      RA_GROUP DEC_GROUP ... flux1450 fluxerror1450 skyflag\n",
       "      str18        float64   float64  ... float32     float32     int32 \n",
       "------------------ -------- --------- ... -------- ------------- -------\n",
       "000000.66+145828.8   0.0028   14.9747 ...       --            --      --"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coords = SkyCoord(ra=[0.0028,9.99,2.813458], dec=[14.9747,-9.99,14.767167], unit='deg')\n",
    "matches, list_of_meta, meta_stack = sdb.meta_from_coords(coords, first=False)\n",
    "print('Matches = ', matches)\n",
    "meta_stack[list_of_meta[0]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
